select sequencial,* from series_nf where serie_nf = '1'
select * from faturamento where NF_SAIDA = '286389'

select * from faturamento where NF_SAIDA = '999888' and filial = '546_BAZAR 2'
select * from faturamento_item where NF_SAIDA = '999888' and filial = '546_BAZAR 2'
select * from faturamento_prod where NF_SAIDA = '999888' and filial = '546_BAZAR 2'

select * from faturamento where NF_SAIDA = '999888' and filial = '546_BAZAR 2'
286389

/*

begin transaction
update faturamento 
set NF_SAIDA = '286389'
where NF_SAIDA = '999888' and filial = '546_BAZAR 2'
commit

begin transaction
update faturamento_item 
set NF_SAIDA = '286389'
where NF_SAIDA = '999888' and filial = '546_BAZAR 2'
commit

begin transaction
update faturamento_prod 
set NF_SAIDA = '286389'
where NF_SAIDA = '999888' and filial = '546_BAZAR 2'
commit
*/


/*
begin transaction
update series_nf
set sequencial = sequencial + 1
where serie_nf = '1'
commit
*/